home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1996 June / macformat-038.iso / Demos / Interactive Wave / _DATAS / SHARED.Dxr / 00975_Macro Temporisations.ls < prev    next >
Encoding:
Text File  |  1995-08-06  |  1.2 KB  |  78 lines

  1. on WaitTicks0 Duree
  2.   set Duree to Duree + the ticks
  3.   repeat while the ticks < Duree
  4.     Interrupt0()
  5.   end repeat
  6. end
  7.  
  8. on WaitDown
  9.   repeat while the mouseDown
  10.     Gest3Rupt()
  11.   end repeat
  12. end
  13.  
  14. on WaitUp
  15.   global DcDemo
  16.   if DcDemo then
  17.     exit
  18.   end if
  19.   repeat while the mouseUp
  20.     Gest3Rupt()
  21.   end repeat
  22. end
  23.  
  24. on WaitFinSon Piste
  25.   if paramCount() = 0 then
  26.     set Piste to 1
  27.   end if
  28.   repeat while soundBusy(Piste) = 1
  29.     Gest3Rupt()
  30.   end repeat
  31. end
  32.  
  33. on waitfinsonmark Piste
  34.   if paramCount() = 0 then
  35.     set Piste to 1
  36.   end if
  37.   if soundBusy(Piste) then
  38.     go(#loop)
  39.   end if
  40. end
  41.  
  42. on Gest3Rupt
  43.   Interrupt0()
  44.   Interrupt1()
  45.   Interrupt2()
  46.   updateStage()
  47. end
  48.  
  49. on AnnuleJumpWait
  50.   global listJumpWait
  51.   set listJumpWait to list()
  52. end
  53.  
  54. on SetJumpWait Duree, MacroJPwait
  55.   global listJumpWait
  56.   set listJumpWait to list(the ticks + Duree, MacroJPwait)
  57. end
  58.  
  59. on JumpWait
  60.   global listJumpWait, DcDemo
  61.   if listJumpWait = [] then
  62.     exit
  63.   end if
  64.   if the ticks < getAt(listJumpWait, 1) then
  65.     exit
  66.   end if
  67.   if DcDemo then
  68.     exit
  69.   end if
  70.   if the lastEvent < 120 then
  71.     setAt(listJumpWait, 1, the ticks + 300)
  72.     exit
  73.   end if
  74.   if CallM(getAt(listJumpWait, 2)) then
  75.     AnnuleJumpWait()
  76.   end if
  77. end
  78.